<template>
    <div class="box">
        <van-tabs active="active">
            <van-tab title="商品">
                <lunbo :list="detail.pics"></lunbo>
                <p>{{ detail.goods_name }}</p>
                <p style="color: red;">{{ detail.goods_price }}$</p>
            </van-tab>
            <van-tab title="详情">
                <div v-html="detail.goods_introduce"></div>
            </van-tab>
            <van-tab title="评价">内容 3</van-tab>
        </van-tabs>
    </div>
</template>

<script setup>
import { detailApi } from '@/api/api'
import lunbo from '@/components/lunbo.vue'
import { useRoute, useRouter } from 'vue-router'
const router = useRouter()
const route = useRoute()
import { ref } from 'vue'
let goods_id = ref(route.query.goods_id)
let detail = ref({})
const getlist = () => {
    detailApi(goods_id.value).then((res) => {
        detail.value = res.data.message
    })
}
getlist()
</script>

<style lang="scss" scoped></style>